<?php

/**
 * OntoWiki model config template
 *
 * @author Philipp Frischmuth <pfrischmuth@googlemail.com>
 * @version $Id: $
 */

?>
<fieldset>
    <legend><?php echo $this->_('Model Properties') ?></legend>
    <input type="hidden" name="m" value="<?php echo $this->modeluri ?>" />
    <div>
        <label for="modeluri"><?php echo $this->_('Model URI') ?></label>
        <input class="text" id="modeluri" type="text" name="modeluri" <?php echo $this->readonly ?> value="<?php echo $this->modeluri ?>" />
        <br class="clearall" />
    </div>
    <div>
        <label for="baseuri"><?php echo $this->_('Base URI') ?></label>
        <input class="text" id="baseuri" type="text" name="baseuri" <?php echo $this->readonly ?> value="<?php echo $this->baseuri ?>" />
        <br class="clearall" />
    </div>
    <div class="clearall"></div>
</fieldset>

<fieldset>
    <div>
        <label for="ishidden"><?php echo $this->_('Hide Knowledge Base') ?></label>
        <input id="is-hidden-input" class="checkbox" type="checkbox" <?php echo $this->isHidden ?> value="ishidden" name="ishidden"/>
    </div>
     <div>
        <label for="isLarge"><?php echo $this->_('is large (disable counting and add limits)') ?></label>
        <input id="is-large-input" class="checkbox" type="checkbox" <?php echo $this->isLarge ?> value="isLarge" name="isLarge"/>
    </div>
    <div>
        <label for="usesysbase"><?php echo $this->_('Use SysBase model') ?></label>
        <input id="use-sysbase-input" class="checkbox" type="checkbox" <?php echo $this->useSysBase ?> <?php echo $this->useSysBaseDisabled ?> value="usesysbase" name="usesysbase"/>
    </div>
    <div class="clearall"></div>
</fieldset>


<fieldset>
    <legend><?php echo $this->_('Namespaces and Prefixes') ?></legend>
	<div>
		<div name="editprefix">
<table class="separated-vertical">
		<tr>
				<th>Prefix</th>
				<th>Namespace</th>
				<th></th>
		</tr>
		<tr id="newPrefix">
			<td> <input class="text" type="text" name="new_prefix_prefix" /> </td>
			<td> <input class="text" type="text" name="new_prefix_namespace" /> </td>
			<td class="selector"> <!-- <a class="button" id="prefix-table-addButton"><span>Add</span></a> --> </td>
		</tr>
	<?php foreach ($this->prefixes as $prefix): ?>
		<tr>
			<td><?php echo $this->escape($prefix[0]) ?></td>
			<td><?php echo $this->escape($prefix[1]) ?></td>
<?php
        $deleteUrl = new OntoWiki_Url(array('controller' => 'model', 'action' => 'config'), array('m'));
        $deleteUrl->setParam('delete_prefix', $prefix[0], true);
?>
			<td class="selector">
				<a href="<?php echo $deleteUrl ?>"><img alt="tonne" src="<?php echo $this->themeUrlBase ?>/images/icon-delete.png"/></a>
			</td>
		</tr>
	<?php endforeach; ?>
</table>
		</div>
	</div>
	<div class="clearall"></div>
</fieldset>
